#include <cstdio>
#include <algorithm>

const int coins[] = { 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000 };
const int count = sizeof(coins) / sizeof(int);
const int amount_max = 30000;

int main()
{
	long long F[ amount_max + 1 ];
	std::fill( F, F + amount_max + 1, 1 );
	for( int i = 1; i < count; i++ )
	{
		for( int j = coins[i]; j <= amount_max; j += 5 )
		{
			F[j] += F[j - coins[i]];
		}
	}

	while(1)
	{
		int d = 0;
		int c = 0;
		scanf( "%d.%d", &d, &c );
		if( d == 0 && c == 0 ) break;
		printf( "%3d.%02d%17lld\n", d, c, F[d * 100 + c] );
	}
	return 0;
}
